package zhishuang.wang.sansi.tools;

import zhishuang.wang.sansi.tools.time.DateFormat;

/**
 * @Author Zhishuang.Wang
 * @Date 2023/7/5 11:14
 * @Email 1406110602@qq.com
 */
public class PrintRunLog {
    public PrintRunLog() {
    }

    public static int printByteArrayInfor(String showFlag, byte[] data) {
        String dataStr = "";
        if (data != null && data.length > 0) {
            for(int i = 0; i < data.length; ++i) {
                dataStr = dataStr + String.format("%02X ", data[i]);
            }
        }

        dataStr = "[" + DateFormat.getNowDataFormat() + "][" + showFlag + "]:" + dataStr;
        System.out.println(dataStr);
        return 0;
    }
}
